interface Todo1 {
  title: string;
  description?: string;
  completed: boolean;
}

type MyReadonly2<T, K extends keyof T = keyof T> = {
  readonly [P in K]: T[P]; // 循环 K 字段 并加上 readonly
} & {
  [P in keyof T as P extends K ? never : P]: T[P]; // 循环 除 K 之外的 T 里面的字段
};
type readyTest1 = MyReadonly2<Todo1, "title" | "description">;
let readValue: readyTest1 = {
  title: "1",
  description: "2",
  completed: false,
};
// readValue.title = "100";
